package edu.npu.cv.enums;

import com.google.common.collect.ImmutableList;

import java.util.List;

/**
 * @ClassName ArticleCategory
 * @Description TODO
 * @Author Quentin_zyj
 * @Date 2021/11/23 19:45
 */
public class ArticleCategory {

    /** 活动类文章 */
    public static final int ACTIVITY = 1;
    /** 公告类文章 */
    public static final int NEWS = 2;

    public static final List<Integer> ALL_CATEGORIES = ImmutableList.of(ACTIVITY, NEWS);

    public static boolean isLegal(int category) {
        for (Integer integer : ALL_CATEGORIES) {
            if (integer == category) {
                return true;
            }
        }
        return false;
    }

}
